import java.util.Scanner;

public class bit22 {
    public static void main(String[] args) {
        int count=0;
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        while (n!=0){
            if((n&1)==1){
                count++;
            }
            n=n>>>1;
        }
        System.out.println(count);
    }
}
